home *** CD-ROM | disk | FTP | other *** search
- Declare Function GetKeyState Lib "User" (ByVal nVirtKey As Integer) As Integer
- Declare Function GetAsyncKeyState Lib "User" (ByVal vKey As Integer) As Integer
- Declare Sub GetKeyboardState Lib "User" (LpKeyState As Any)
- Declare Sub SetKeyboardState Lib "User" (LpKeyState As Any)
-
- Dim Keys As KeysType
-
- ' KeyCodes for Toggled keys
- Const KEY_CAPITAL = &H14
- Const KEY_INSERT = &H2D
- Const KEY_NUMLOCK = &H90
- Const KEY_SCROLL = &H91
-
- Function CapsLocked ()
- If GetKeyState(KEY_CAPITAL) And 1 Then
- CapsLocked = True
- Else
- CapsLocked = False
- End If
- End Function
-
- Function InsertMode ()
- If GetKeyState(KEY_INSERT) And 1 Then
- InsertMode = False
- Else
- InsertMode = True
- End If
- End Function
-
- Function NumLocked ()
- If GetKeyState(KEY_NUMLOCK) And 1 Then
- NumLocked = True
- Else
- NumLocked = False
- End If
- End Function
-
- Function ScrollLocked ()
- If GetKeyState(KEY_SCROLL) And 1 Then
- ScrollLocked = True
- Else
- ScrollLocked = False
- End If
- End Function
-
-